from fastapi.middleware.cors import CORSMiddleware
from fastapi import FastAPI
from backend.api.users import user_router
from backend.api.files import file_router

app = FastAPI()
app.add_middleware(
    CORSMiddleware,  # type: ignore
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)


# 注册路由
app.include_router(user_router)
app.include_router(file_router)
